﻿<UserControl x:Class="BOL.Apps.GeneNetworkBrowser.Controls.CoxView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             >
    <UserControl.Resources>
        <DataTemplate x:Key="MyItemTemplate">
            <Border x:Name="Cell">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Name}" />
                </StackPanel>
            </Border>
            <DataTemplate.Triggers>
                <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                    <Setter Property="Background" Value="#e9e9e9" 
                            TargetName="Cell"></Setter>
                </Trigger>
                <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                    <Setter Property="Background" Value="#d9d9d9" 
                            TargetName="Cell"></Setter>
                </Trigger>
            </DataTemplate.Triggers>
        </DataTemplate>

    </UserControl.Resources>
    <DockPanel>
        <ItemsControl ItemsSource="{Binding Vertices}" ItemTemplate="{StaticResource MyItemTemplate}"/>
    </DockPanel>
</UserControl>
